﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;

/// <summary>
/// SQ_Eval_Pub 的摘要说明
/// </summary>
public class SQ_Eval_Pub
{
    public SQ_Eval_Pub()
    {
        //
        // TODO: 在此处添加构造函数逻辑
        //
    }

    public static string GetIsUsing(string state)
    {
        string restr = "可用";
        switch (state)
        {
            case "0":
                restr = "<a style=\"color:red\">停用</a>";
                break;
            case "1":
                restr = "<a style=\"color:green\">可用</a>";
                break;
            case "True":
                restr = "<a style=\"color:green\">可用</a>";
                break;
            case "False":
                restr = "<a style=\"color:red\">停用</a>";
                break;

        }
        return restr;
    }

    public static string GetIsZd(string state)
    {
        string restr = "是";
        switch (state)
        {
            case "0":
                restr = "<a style=\"color:red\">否</a>";
                break;
            case "1":
                restr = "<a style=\"color:green\">是</a>";
                break;
            case "True":
                restr = "<a style=\"color:green\">是</a>";
                break;
            case "False":
                restr = "<a style=\"color:red\">否</a>";
                break;

        }
        return restr;
    }
    public static string GetPsType(string type)
    {
        string restr = "部门岗";
        switch (type)
        {

            case "1":
                restr = "<a style=\"color:red\">部门岗</a>";
                break;
            case "2":
                restr = "<a style=\"color:blue\">主管岗</a>";
                break;
            case "3":
                restr = "<a style=\"color:green\">职工岗</a>";
                break;
        }
        return restr;
    }

    public static void GetYearMonth(DateTime now, ref int Year, ref int Month)
    {
        int day = now.Day;
        if (day >= 26)
        {
            Year = now.AddMonths(1).Year;
            Month = now.AddMonths(1).Month;
        }
        else
        {
            Year = now.Year;
            Month = now.Month;
        }
    }
    public static string GetTaskState(string type)
    {
        string restr = "";
        switch (type)
        {

            case "0":
                restr = "<a style=\"color:red\">作废</a>";
                break;
            case "1":
                restr = "<a style=\"color:blue\">未执行</a>";
                break;
            case "2":
                restr = "<a style=\"color:#ce23f3\">执行中</a>";
                break;
            case "3":
                restr = "<a style=\"color:green\">待验收</a>";
                break;
            case "4":
                restr = "<a>已完成</a>";
                break;
        }
        return restr;
    }


    public static string GetTaskType(string type)
    {
        string restr = "";
        switch (type)
        {
            case "0":
                restr = "<b style=\"color:blue\">[固]</b>";
                break;
            case "1":
                restr = "<b style=\"color:green\">[临]</b>";
                break;
        }
        return restr;
    }

    public static string GetAuditType(string type)
    {
        string restr = "";
        switch (type)
        {
            case "Y":
                restr = "<b style=\"color:blue\">[验收]</b>";
                break;
            case "F":
                restr = "<b style=\"color:blue\">[操作]</b>";
                break;
        }
        return restr;
    }

    public static string GetState(string type)
    {
        string restr = "";
        switch (type)
        {
            case "0":
                restr = "<b style=\"color:blue\">[作废]</b>";
                break;
            case "1":
                restr = "<b style=\"color:blue\">[审核通过]</b>";
                break;
            case "2":
                restr = "<b style=\"color:blue\">[审核不通过]</b>";
                break;
            case "3":
                restr = "<b style=\"color:blue\">[执行成功]</b>";
                break;
        }
        return restr;
    }


}